from django.contrib import admin

# Register your models here.
from .models import CartInfos,OrderInfos
# admin.site.register(CartInfos)
# admin.site.register(OrderInfos)
@admin.register(CartInfos)
class CartInfosAdmin(admin.ModelAdmin):
    #设置在列表页显示字段是id和quantity
    list_display = ['id','quantity']
@admin.register(OrderInfos)
class OrderInfosAdmin(admin.ModelAdmin):
    list_display = ['id','price','created','state']
    list_filter = ['state']
    date_hierarchy = 'created'